/*Diego Lima de Freitas RA: 317632
 *Yuri Souza Padua RA: 317420
 * 
 * Classe que trata os parenteses
 */
package AST;

public class ParenthesisExpr extends Expr {

    private Expr expr;

    public ParenthesisExpr(Expr expr) {
        this.expr = expr;
    }

    @Override
    public void genC(PW pw, boolean putParenthesis) {
        pw.out.print("(");
        expr.genC(pw, false);
        pw.print(")");
    }

    @Override
    public Type getType() {
        return expr.getType();
    }
}
